package com.vooda.dto.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

/**
 * @author KennyDavid
 */

@Data
@Builder
@ApiModel
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class UserBo extends BaseBO {

    @ApiModelProperty(value = "昵称")
    @NotBlank(message = "昵称不能为空", groups = {Post.class, Put.class})
    @Length(min = 1, max = 50, message = "长度在{min}到{max}之间", groups = {Post.class, Put.class})
    private String name;

    @ApiModelProperty(value = "头像")
    @NotBlank(message = "头像不能为空", groups = {Post.class, Put.class})
    private String imageUrl;

    @ApiModelProperty(value = "openId")
    @NotBlank(message = "openId不能为空", groups = {Post.class, Put.class})
    private String code;
}